principal=float(input("请输入本金："))
target=float(input("请输入预期金额："))
t=1
while principal<target:
    t+=1
    principal*=1.05
    print("第%i年本息：%f" %(t-1,principal))
print("第%i年本息达到预期金额" %(t-1))